package com.github.dengmin.mysql.utils;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author dengmin
 * @Created 2020/8/17 上午9:52
 */
public class HttpServletRequestUtil {
    private static final long serialVersionUID = 1L;

    public static HttpServletRequest getRequest(){
        return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
    }

}
